#include "QtGobang.h"
#include <QPainter>
#include <QMouseEvent>
#include <QMessageBox>

QtGobang::QtGobang(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
    for (int i = 0; i < Row; i++)
        for (int j = 0; j < Row; j++)
            CheckBoard[i][j] = 0;
    ChessRow = -1;
    ChessCol = -1;
    Player = true;
    GameOver = false;
    update();
}

void QtGobang::paintEvent(QPaintEvent*)
{
    
}

void QtGobang::mouseMoveEvent(QMouseEvent* event)
{
    if (GameOver)
        return;
    update();
}